﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections.Specialized;

namespace WebSvcPlugin
{
    public partial class frmConfig : Form
    {
        public bool Enabled;
        public string BaseUrl;

        public frmConfig(NameValueCollection current)
        {
            InitializeComponent();
            try
            {
                chkEnabled.Checked = bool.Parse(current["websvcplugin_enabled"]);
                txtBaseUrl.Text = current["websvcplugin_baseurl"];
            }
            catch
            {
                // ignore
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            Enabled = chkEnabled.Checked;
            BaseUrl = txtBaseUrl.Text;
        }
    }
}
